package com.epam.Aquarium;

import com.epam.Fish.Catfish;
import com.epam.Fish.Fish;
import com.epam.Fish.Goldfish;
import com.epam.Fish.Guppy;

import java.util.ArrayList;
import java.util.List;

public class AquariumFish extends Aquarium {

    public AquariumFish(){

    }

    public AquariumFish(double price, AquariumQuality qualityAquarium) {
        super(price, qualityAquarium);
    }

    private List<Fish> fishs = new ArrayList<Fish>();

    public  void addFish(Fish fish){

        fishs.add(fish);

        setPrice(getPrice()+fish.getPrice());
    }

    public void showFish(){
        System.out.println("Fish in aquarium:");
        for (Fish f : fishs){
            System.out.println(f.toString());
        }
    }

    @Override
    public String toString() {
        return "Aquarium Fish [ Price: "+getPrice()+"; Quality: "+ getQuality()+"]";
    }
}
